// 状态即是数据
const state = {
    isLoading: false
};
mutations: {
    openLoading: function (state) {
        state.isLoading = true;
    },
    closeLoading: function (state) {
        state.isLoading = false;
    }
};

// 定义getters 读取状态
const getters = {
    getLoading(state) {
        return state.isLoading;
    }
};
    actions: {
        loadingStart({ commit }) {
            commit("openLoading");
    },
loadingEnd({ commit }) {
    commit("closeLoading");
}
},
modules: { }
});
